import { request } from "@/utils/service"
import {
  DeliveryUserDataParams,
  DeliveryUserDataResposne,
  InterviewByCompanyParams,
  InterviewByUCompanyResponse,
  InviteInterviewParams
} from "./types/interview"

// 企业获取面试进度请求
export function getUserByCompany(data: InterviewByCompanyParams) {
  return request<InterviewByUCompanyResponse>({
    url: "interview/list/page/company",
    method: "post",
    data
  })
}

// 企业面试操作，包括：邀请，同意，拒绝
export function handleCompanyApprove(data: InviteInterviewParams) {
  return request<ApiResponseData<boolean>>({
    url: "interview/inviteOrRefuse",
    method: "post",
    data
  })
}

// 企业获取投递者列表
export function getDeliveryUserList(data: DeliveryUserDataParams) {
  return request<DeliveryUserDataResposne>({
    url: "interview/list/page/company",
    method: "post",
    data
  })
}
